<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.14"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>BabyOS: b_at.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="2.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">BabyOS
   &#160;<span id="projectnumber">V1.1.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.14 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',false,false,'search.php','Search');
});
/* @license-end */</script>
<div id="main-nav"></div>
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_b9223522bb56aee4ab59f7ba381d2163.html">bos</a></li><li class="navelem"><a class="el" href="dir_f2a2cc749b6bfcea90db6730434b0bd6.html">core</a></li><li class="navelem"><a class="el" href="dir_37b66dfbfdffce01c33ebea49c49c2c3.html">inc</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">b_at.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="b__at_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;</div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;<span class="preprocessor">#ifndef __B_AT_H__</span></div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;<span class="preprocessor">#define __B_AT_H__</span></div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;</div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;<span class="preprocessor">#ifdef __cplusplus</span></div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160; <span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> {</div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;</div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;<span class="comment">/*Includes ----------------------------------------------*/</span></div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="b__config_8h.html">b_config.h</a>&quot;</span>  </div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;<span class="preprocessor">#if _AT_ENABLE</span></div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;</div><div class="line"><a name="l00057"></a><span class="lineno"><a class="line" href="group___a_t___exported___types_definitions.html#ga160ea044085772742d8b369ae5af1f8e">   57</a></span>&#160;<span class="keyword">typedef</span> int (*<a class="code" href="group___a_t___exported___types_definitions.html#ga160ea044085772742d8b369ae5af1f8e">pAT_TX</a>)(uint8_t *, uint16_t len); </div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160; </div><div class="line"><a name="l00059"></a><span class="lineno"><a class="line" href="structb_a_t___info__t.html">   59</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct</span></div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;{</div><div class="line"><a name="l00061"></a><span class="lineno"><a class="line" href="structb_a_t___info__t.html#a3e0101ab4f197aedba71e5ed14c6bf20">   61</a></span>&#160;    uint8_t <a class="code" href="structb_a_t___info__t.html#a3e0101ab4f197aedba71e5ed14c6bf20">stat</a>;</div><div class="line"><a name="l00062"></a><span class="lineno"><a class="line" href="structb_a_t___info__t.html#a50b7ce7bdc57a11d0f9faefb4a81b4cc">   62</a></span>&#160;    uint32_t <a class="code" href="structb_a_t___info__t.html#a50b7ce7bdc57a11d0f9faefb4a81b4cc">ctick</a>;</div><div class="line"><a name="l00063"></a><span class="lineno"><a class="line" href="structb_a_t___info__t.html#a8d817bb993220791d49f40bf8be191c6">   63</a></span>&#160;    <a class="code" href="group___a_t___exported___types_definitions.html#ga160ea044085772742d8b369ae5af1f8e">pAT_TX</a> <a class="code" href="structb_a_t___info__t.html#a8d817bb993220791d49f40bf8be191c6">AT_TXFunc</a>; </div><div class="line"><a name="l00064"></a><span class="lineno"><a class="line" href="structb_a_t___info__t.html#a83e2127a0a145240c5097d61e2e6f265">   64</a></span>&#160;    uint8_t buf[<a class="code" href="b__config_8h.html#a017d1f392b7b6a5ccc145cda5724cf83">_AT_BUF_LEN</a>];</div><div class="line"><a name="l00065"></a><span class="lineno"><a class="line" href="structb_a_t___info__t.html#a8c8ca291d9dc486fd71177e6d987c04f">   65</a></span>&#160;    <span class="keyword">volatile</span> uint8_t <a class="code" href="structb_a_t___info__t.html#a8c8ca291d9dc486fd71177e6d987c04f">r_flag</a>; </div><div class="line"><a name="l00066"></a><span class="lineno"><a class="line" href="structb_a_t___info__t.html#a9fadd39555572d9db701cd13e61d821f">   66</a></span>&#160;    <span class="keyword">volatile</span> uint16_t <a class="code" href="structb_a_t___info__t.html#a9fadd39555572d9db701cd13e61d821f">r_len</a>;</div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;}<a class="code" href="structb_a_t___info__t.html">bAT_Info_t</a>;</div><div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;</div><div class="line"><a name="l00069"></a><span class="lineno"><a class="line" href="structb_a_t___expected_resp__t.html">   69</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct</span></div><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;{</div><div class="line"><a name="l00071"></a><span class="lineno"><a class="line" href="structb_a_t___expected_resp__t.html#afbabeec77450dafca17a2ff622b9735b">   71</a></span>&#160;    uint8_t *<a class="code" href="structb_a_t___expected_resp__t.html#afbabeec77450dafca17a2ff622b9735b">pResp</a>;</div><div class="line"><a name="l00072"></a><span class="lineno"><a class="line" href="structb_a_t___expected_resp__t.html#a8aed22e2c7b283705ec82e0120515618">   72</a></span>&#160;    uint16_t <a class="code" href="structb_a_t___expected_resp__t.html#a8aed22e2c7b283705ec82e0120515618">len</a>;</div><div class="line"><a name="l00073"></a><span class="lineno"><a class="line" href="structb_a_t___expected_resp__t.html#ab5627d8d8b095c198e2523c44ca380ac">   73</a></span>&#160;    uint32_t <a class="code" href="structb_a_t___expected_resp__t.html#ab5627d8d8b095c198e2523c44ca380ac">timeout</a>;</div><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;}<a class="code" href="structb_a_t___expected_resp__t.html">bAT_ExpectedResp_t</a>;</div><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;</div><div class="line"><a name="l00084"></a><span class="lineno"><a class="line" href="group___a_t___exported___defines.html#ga6ae6690bcb77eea3c4dc5eab165e64ed">   84</a></span>&#160;<span class="preprocessor">#define AT_STA_NULL         0</span></div><div class="line"><a name="l00085"></a><span class="lineno"><a class="line" href="group___a_t___exported___defines.html#gac000ac20910d57213700fa37104a93b6">   85</a></span>&#160;<span class="preprocessor">#define AT_STA_WAIT         1</span></div><div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;</div><div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;<span class="keywordtype">int</span> <a class="code" href="group___a_t___exported___functions.html#gafab0d30ccf93e9d332ab8c54389b2e97">bAT_Regist</a>(<a class="code" href="group___a_t___exported___types_definitions.html#ga160ea044085772742d8b369ae5af1f8e">pAT_TX</a> ptx);</div><div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;<span class="keywordtype">int</span> <a class="code" href="group___a_t___exported___functions.html#ga70c7211e4de1db5c3f4c7e8707e4979d">bAT_Write</a>(<span class="keywordtype">int</span> no, <a class="code" href="structb_a_t___expected_resp__t.html">bAT_ExpectedResp_t</a> *pe_resp, <span class="keyword">const</span> <span class="keywordtype">char</span> *pcmd, ...);</div><div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;<span class="keywordtype">int</span> <a class="code" href="group___a_t___exported___functions.html#ga8c06cbe99efea24cb2510ac555967fbf">bAT_Read</a>(<span class="keywordtype">int</span> no, uint8_t *pbuf, uint16_t size);</div><div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;</div><div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;<span class="preprocessor">#ifdef __cplusplus</span></div><div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;    }</div><div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160; </div><div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;<span class="preprocessor">#endif  </span></div><div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;</div><div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;<span class="comment">/************************ Copyright (c) 2019 Bean *****END OF FILE****/</span></div><div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;</div><div class="ttc" id="structb_a_t___info__t_html_a9fadd39555572d9db701cd13e61d821f"><div class="ttname"><a href="structb_a_t___info__t.html#a9fadd39555572d9db701cd13e61d821f">bAT_Info_t::r_len</a></div><div class="ttdeci">volatile uint16_t r_len</div><div class="ttdef"><b>Definition:</b> <a href="b__at_8h_source.html#l00066">b_at.h:66</a></div></div>
<div class="ttc" id="structb_a_t___expected_resp__t_html_ab5627d8d8b095c198e2523c44ca380ac"><div class="ttname"><a href="structb_a_t___expected_resp__t.html#ab5627d8d8b095c198e2523c44ca380ac">bAT_ExpectedResp_t::timeout</a></div><div class="ttdeci">uint32_t timeout</div><div class="ttdef"><b>Definition:</b> <a href="b__at_8h_source.html#l00073">b_at.h:73</a></div></div>
<div class="ttc" id="group___a_t___exported___functions_html_ga8c06cbe99efea24cb2510ac555967fbf"><div class="ttname"><a href="group___a_t___exported___functions.html#ga8c06cbe99efea24cb2510ac555967fbf">bAT_Read</a></div><div class="ttdeci">int bAT_Read(int no, uint8_t *pbuf, uint16_t size)</div></div>
<div class="ttc" id="b__config_8h_html_a017d1f392b7b6a5ccc145cda5724cf83"><div class="ttname"><a href="b__config_8h.html#a017d1f392b7b6a5ccc145cda5724cf83">_AT_BUF_LEN</a></div><div class="ttdeci">#define _AT_BUF_LEN</div><div class="ttdef"><b>Definition:</b> <a href="b__config_8h_source.html#l00148">b_config.h:148</a></div></div>
<div class="ttc" id="group___a_t___exported___functions_html_gafab0d30ccf93e9d332ab8c54389b2e97"><div class="ttname"><a href="group___a_t___exported___functions.html#gafab0d30ccf93e9d332ab8c54389b2e97">bAT_Regist</a></div><div class="ttdeci">int bAT_Regist(pAT_TX ptx)</div></div>
<div class="ttc" id="structb_a_t___info__t_html_a8c8ca291d9dc486fd71177e6d987c04f"><div class="ttname"><a href="structb_a_t___info__t.html#a8c8ca291d9dc486fd71177e6d987c04f">bAT_Info_t::r_flag</a></div><div class="ttdeci">volatile uint8_t r_flag</div><div class="ttdef"><b>Definition:</b> <a href="b__at_8h_source.html#l00065">b_at.h:65</a></div></div>
<div class="ttc" id="group___a_t___exported___functions_html_ga70c7211e4de1db5c3f4c7e8707e4979d"><div class="ttname"><a href="group___a_t___exported___functions.html#ga70c7211e4de1db5c3f4c7e8707e4979d">bAT_Write</a></div><div class="ttdeci">int bAT_Write(int no, bAT_ExpectedResp_t *pe_resp, const char *pcmd,...)</div></div>
<div class="ttc" id="structb_a_t___info__t_html_a3e0101ab4f197aedba71e5ed14c6bf20"><div class="ttname"><a href="structb_a_t___info__t.html#a3e0101ab4f197aedba71e5ed14c6bf20">bAT_Info_t::stat</a></div><div class="ttdeci">uint8_t stat</div><div class="ttdef"><b>Definition:</b> <a href="b__at_8h_source.html#l00061">b_at.h:61</a></div></div>
<div class="ttc" id="structb_a_t___expected_resp__t_html_afbabeec77450dafca17a2ff622b9735b"><div class="ttname"><a href="structb_a_t___expected_resp__t.html#afbabeec77450dafca17a2ff622b9735b">bAT_ExpectedResp_t::pResp</a></div><div class="ttdeci">uint8_t * pResp</div><div class="ttdef"><b>Definition:</b> <a href="b__at_8h_source.html#l00071">b_at.h:71</a></div></div>
<div class="ttc" id="structb_a_t___info__t_html_a8d817bb993220791d49f40bf8be191c6"><div class="ttname"><a href="structb_a_t___info__t.html#a8d817bb993220791d49f40bf8be191c6">bAT_Info_t::AT_TXFunc</a></div><div class="ttdeci">pAT_TX AT_TXFunc</div><div class="ttdef"><b>Definition:</b> <a href="b__at_8h_source.html#l00063">b_at.h:63</a></div></div>
<div class="ttc" id="b__config_8h_html"><div class="ttname"><a href="b__config_8h.html">b_config.h</a></div></div>
<div class="ttc" id="structb_a_t___expected_resp__t_html"><div class="ttname"><a href="structb_a_t___expected_resp__t.html">bAT_ExpectedResp_t</a></div><div class="ttdef"><b>Definition:</b> <a href="b__at_8h_source.html#l00069">b_at.h:69</a></div></div>
<div class="ttc" id="structb_a_t___info__t_html_a50b7ce7bdc57a11d0f9faefb4a81b4cc"><div class="ttname"><a href="structb_a_t___info__t.html#a50b7ce7bdc57a11d0f9faefb4a81b4cc">bAT_Info_t::ctick</a></div><div class="ttdeci">uint32_t ctick</div><div class="ttdef"><b>Definition:</b> <a href="b__at_8h_source.html#l00062">b_at.h:62</a></div></div>
<div class="ttc" id="structb_a_t___expected_resp__t_html_a8aed22e2c7b283705ec82e0120515618"><div class="ttname"><a href="structb_a_t___expected_resp__t.html#a8aed22e2c7b283705ec82e0120515618">bAT_ExpectedResp_t::len</a></div><div class="ttdeci">uint16_t len</div><div class="ttdef"><b>Definition:</b> <a href="b__at_8h_source.html#l00072">b_at.h:72</a></div></div>
<div class="ttc" id="structb_a_t___info__t_html"><div class="ttname"><a href="structb_a_t___info__t.html">bAT_Info_t</a></div><div class="ttdef"><b>Definition:</b> <a href="b__at_8h_source.html#l00059">b_at.h:59</a></div></div>
<div class="ttc" id="group___a_t___exported___types_definitions_html_ga160ea044085772742d8b369ae5af1f8e"><div class="ttname"><a href="group___a_t___exported___types_definitions.html#ga160ea044085772742d8b369ae5af1f8e">pAT_TX</a></div><div class="ttdeci">int(* pAT_TX)(uint8_t *, uint16_t len)</div><div class="ttdef"><b>Definition:</b> <a href="b__at_8h_source.html#l00057">b_at.h:57</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.14
</small></address>
</body>
</html>
